package cn.community.system.mapper;

import cn.community.system.domain.Activity;
import cn.community.system.query.ActivityQuery;
import cn.community.system.query.QueryObject;
import cn.community.system.vo.ActivityVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ActivityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Activity activity);

    Activity selectByPrimaryKey(Long id);

    List<Activity> selectAll();

    int updateByPrimaryKey(Activity activity);

    List<Activity> selectForList(QueryObject qo);

    List<Activity> selectForAssociation(ActivityQuery qo);

    List<ActivityVo> selectForMemberList(QueryObject qo);

    void batchUpdate(@Param("isAgree")Integer isAgree,@Param("id")Long id);

    List<Activity> listOwnAssociation(Long id);

    void increate(@Param("nowperson")Integer nowperson,@Param("id")Long id);

    void decreate(@Param("nowperson")Integer nowperson, @Param("id")Long id);

    void passOne(@Param("id")Long id, @Param("createTime")Date createTime, @Param("isAgree")Integer isAgree);

    void updateActivityNumber(@Param("id")Long id, @Param("number")int number);

    void updateDay(Long id, Double day);

    Activity checkCreateTime(@Param("createTime")Date createTime, @Param("id")Long id);

    List<Activity> getByTime(@Param("old")Date old, @Param("now")Date now);
}
